package testng;

import org.testng.annotations.Test;


public class TestNGDemo1 {

    @Test(expectedExceptions = RuntimeException.class)
    public void afterMethod() {
        int i = 1 / 0;
        System.out.println("断言抛出异常"+i);
    }
    @Test(enabled = false)
    public void test1(){
        System.out.println("忽略的test");
    }

    @Test
    public void test2(){
        System.out.println("不忽略的test");
    }

    @Test(timeOut = 1500)
    public void test3() throws InterruptedException {
        System.out.println("延迟1s");
        Thread.sleep(1000);
        System.out.println("延迟结束");
    }
}
